package com.zshan.clinic.common.exception;


import com.zshan.clinic.common.enums.ResultEnum;

/**
 * 自定义异常业务异常
 */
public class BusinessFailException extends RuntimeException {

    private String code;


    public BusinessFailException(String message) {
        super(message);
    }

    public BusinessFailException(String code, String msg) {
        super(msg);
        this.code = code;
    }

    public BusinessFailException(ResultEnum resultEnum) {
        super(resultEnum.getText());
        this.code = resultEnum.getValue();
    }

    public String getCode() {
        return code;
    }
}
